package ReserveController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import Dao.ReserveDao;

public class Reserveinfo implements Controller {
	private ReserveDao reserveDao;

	public void setReserveDao(ReserveDao reserveDao) {
		this.reserveDao = reserveDao;
	}

	@Override
	public ModelAndView handleRequest(HttpServletRequest arg0,
			HttpServletResponse arg1) throws Exception {

		String R_NO = arg0.getParameter("room");
		
		Object data = reserveDao.getInfo(R_NO);
		
		ModelAndView mav = new ModelAndView();
		mav.addObject("data",data);
		mav.setViewName("reserveinfo");

		return mav;
	}

}
